@extends('common')
@section('content')
<style type="text/css">
    span{
        margin-left: 20px;
    }
</style>
<form action="" method="post">
	<table class="table table-bordered table-hover definewidth m10" style="width:1150px;margin-left:10px;">
		<tr>
			<td>
				<br><span>
				 	车型 : 
				 	<select name="c_arctic">
				 		<option value="">请选择</option>
						@foreach($arr1 as $k=>$v)
							<option value="{{$v->pap_id}}">{{$v->pap_name}}</option>
						@endforeach
					</select>
				</span>
				<span>
					教练车型 : 
					<select name="coa_coachtype">
						<option value="">请选择</option>
						@foreach($arr2 as $k=>$v)
							<option value="{{$v->coa_id}}">{{$v->coa_coachtype}}</option>
						@endforeach
					</select>
				</span>
				<span>
					状态 : 
					<select name="car_type">
						<option value="">请选择</option>
						@foreach($arr3 as $k=>$v)
								<?php if ($v->c_a_state):0 ?>
									<option value="0">出勤</option>
								<?php else:1?>
									<option value="1">未出勤</option>
								<?php endif ?>
							
						@endforeach
					</select>
				</span>
				<span>
					<a href="/execu/newVehicle">
						<button type="submit" class="btn btn-primary">新增车辆</button>
					</a>
				</span>
				<span><a href="/execu/renexcelOut"><button type="submit" class="btn btn-primary">导出</button></a></span>
				<br><br>
				<span>
					车牌号 : <input type="text" placeholder="如:京Y20161" name="c_num">
				</span>
				<span>
					行驶证 : <input type="text" placeholder="如:MZMSKCHSYALOUY453" name="c_license">
				</span>
				<span><button type="button" id="search" class="btn btn-primary">查询</button></span>
				<br><br>
			</td>
		</tr>
	</table>
</form>
<div id="tab">
<table class="table table-bordered table-hover definewidth m10" style="width:1150px;margin-left:10px;">
		<th width="10%">序号</th>
		<th width="10%">车牌号</th>
		<th width="10%">车型</th>
		<th width="10%">行驶证号</th>
		<th width="15%">教练车型</th>
		<th width="15%">保险有效期</th>
		<th width="10%">登记日期</th>
		<th width="10%">状态</th>
		<th width="10%">操作</th>
	@foreach($reg_arr as $k => $v)
	<tr>
		<td>{{$v->c_id}}</td>
		<td>{{$v->c_num}}</td>
		<td>{{$v->c_arctic}}</td>
		<td>{{$v->c_license}}</td>
		<td>{{$v->coa_coachtype}}</td>
		<td>{{$v->c_time}}</td>
		<td>{{$v->c_record}}</td>
		<td>{{$v->car_type}}</td>
		<td><a href="#">修改</a></td>
	</tr>
	@endforeach
</table>
</div>
<script type="text/javascript">
	$(document).ready(function(){
		$("#search").click(function(){
			// alert(1);
			var url="{{url('/execu/regist')}}";
            $.get(url,$('form').serialize(),
            function(data){
            	$("#tab").html(data);
            });
        });
	});
</script>
@stop
